<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Default.Master" CodeBehind="SecurityTest.aspx.vb" Inherits="KDESolutions.Providers.UnitTests.SecurityTest" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LeftPane" runat="server">
    <asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
        <WizardSteps>
            <asp:CreateUserWizardStep runat="server">
            </asp:CreateUserWizardStep>
            <asp:CompleteWizardStep runat="server">
            </asp:CompleteWizardStep>
        </WizardSteps>
    </asp:CreateUserWizard>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CenterPane" runat="server">
    <asp:Menu ID="mnuSecurity" runat="server" Orientation="Horizontal">
        <StaticMenuItemStyle HorizontalPadding="12px" />
        <Items>
            <asp:MenuItem Text="Users" Value="0"></asp:MenuItem>
            <asp:MenuItem Text="Roles" Value="1"></asp:MenuItem>
        </Items>
    </asp:Menu>
    <asp:MultiView ID="mvSecurity" runat="server">
        <asp:View ID="vwManageUsers" runat="Server">
           <div class="sectiontitle">Account Management</div>
   <p></p>
   <b>- Total registered users: <asp:Literal runat="server" ID="lblTotUsers" /><br />
   - Users online now: <asp:Literal runat="server" ID="lblOnlineUsers" /></b>
   <p></p>
   Click one of the following link to display all users whose name begins with that letter:
   <p></p>
   <asp:Repeater runat="server" ID="rptAlphabet" OnItemCommand="rptAlphabet_ItemCommand">
      <ItemTemplate><asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Container.DataItem %>'
         CommandArgument='<%# Container.DataItem %>' />&nbsp;&nbsp;
      </ItemTemplate>
   </asp:Repeater>
   <p></p>
   Otherwise use the controls below to search users by partial username or e-mail:
   <p></p>
   <asp:DropDownList runat="server" ID="ddlSearchTypes">
      <asp:ListItem Text="UserName" Selected="true" />
      <asp:ListItem Text="E-mail" />
   </asp:DropDownList> 
   contains 
   <asp:TextBox runat="server" ID="txtSearchText" /> 
   <asp:Button runat="server" ID="btnSearch" Text="Search" OnClick="btnSearch_Click" />
   <p></p>
   <asp:GridView ID="gvwUsers" runat="server" AutoGenerateColumns="False" DataKeyNames="UserName"
      OnRowCreated="gvwUsers_RowCreated">
      <Columns>
         <asp:BoundField HeaderText="UserName" DataField="UserName" />
         <asp:HyperLinkField HeaderText="E-mail" DataTextField="Email" DataNavigateUrlFormatString="mailto:{0}" DataNavigateUrlFields="Email" />
         <asp:BoundField HeaderText="Created" DataField="CreationDate" DataFormatString="{0:MM/dd/yy h:mm tt}" />
         <asp:BoundField HeaderText="Last activity" DataField="LastActivityDate" DataFormatString="{0:MM/dd/yy h:mm tt}" />
         <asp:CheckBoxField HeaderText="Approved" DataField="IsApproved" >
             <ItemStyle HorizontalAlign="Center" />
             <HeaderStyle HorizontalAlign="Center" />
         </asp:CheckBoxField>
          <asp:CheckBoxField DataField="IsLockedOut" HeaderText="Locked" />
         <asp:HyperLinkField Text="&lt;img src='../../images/edit.gif' border='0' /&gt;" DataNavigateUrlFormatString="EditUser.aspx?UserName={0}" DataNavigateUrlFields="UserName" />
         <asp:ButtonField CommandName="Delete" ButtonType="Image" ImageUrl="~/images/delete.gif" />
      </Columns>
      <EmptyDataTemplate><b>No users found for the specified criteria</b></EmptyDataTemplate>
   </asp:GridView>

        </asp:View>
        <asp:View ID="vwManageRoles" runat="Server">
            <br />
            <asp:Label ID="lblCreateRole" runat="server" Text="Create Role:"></asp:Label>
            <asp:TextBox ID="txtAddRoleName" runat="server" Width="232px"></asp:TextBox>
            <asp:Button ID="btnAddRole" runat="server" Text="Add" /><br />
        <br />
            <asp:GridView ID="gvRoles" runat="server" AutoGenerateColumns="False" DataKeyNames="RoleName">
                <Columns>
                    <asp:BoundField DataField="RoleName" HeaderText="Role" />
         <asp:HyperLinkField Text="&lt;img src='../../images/edit.gif' border='0' /&gt;" DataNavigateUrlFormatString="EditRole.aspx?RoleName={0}" DataNavigateUrlFields="RoleName" />
         <asp:ButtonField CommandName="Delete" ButtonType="Image" ImageUrl="~/images/delete.gif" />                    
                </Columns>
            </asp:GridView>
        </asp:View>
    </asp:MultiView>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightPane" runat="server">
</asp:Content>
